-
Notifications
You must be signed in to change notification settings - Fork 0
feat: create re-usable github action #60
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
FYI I keep getting blocked by permission issues.. so i'm moving this to https://github.com/SgtPooki/filecoin-upload-action. Working now at https://github.com/filecoin-project/lotus-docs/actions/runs/18143867462/job/51641077901?pr=821 comment at filecoin-project/lotus-docs#821 (comment) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it would be good for me to look with a fresh head, but here some things coming to midn. Thanks for working on this and helping tease out UX things.
providerAddress: | ||
description: Optional override for storage provider address (on Calibration/Mainnet). Defaults to a known good provider on Calibration. | ||
required: false | ||
default: "0xa3971A7234a3379A1813d9867B531e7EeB20ae07" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about default to using Synapse's default rather than encoding something here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is primarily for testing: ezpzdz was claimed by someone in slack to be "the most reliable" and I've also noticed the same since I started using it... This should be removed from any prod version
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Got it. Maybe then to make it clear, we just prefix it with some lime "internal" or "temp"?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe discuss the failure cases that can occur that will fail the action?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this should be covered by FLOW and USAGE now, but we can add into README if we want. there is also src/errors.js that has some common errors we can call out.
Things I would also want to make sure are in the logs are:
|
providerAddress: | ||
description: Optional override for storage provider address (on Calibration/Mainnet). Defaults to a known good provider on Calibration. | ||
required: false | ||
default: "0xa3971A7234a3379A1813d9867B531e7EeB20ae07" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is primarily for testing: ezpzdz was claimed by someone in slack to be "the most reliable" and I've also noticed the same since I started using it... This should be removed from any prod version
default: "0xa3971A7234a3379A1813d9867B531e7EeB20ae07" | ||
|
||
outputs: | ||
root_cid: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'Filecoin Pin Upload ✅', | ||
'', | ||
'- IPFS Root CID: `' + IPFS_ROOT_CID + '`', | ||
'- Data Set ID: `' + DATA_SET_ID + '`', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yea its at https://pdp.vxb.ai/calibration. I can add it.
${{ steps.run.outputs.metadata_path || steps.from-cache.outputs.metadata_path || steps.from-artifact.outputs.metadata_path }} | ||
|
||
- name: Comment on PR with IPFS Root CID | ||
if: ${{ github.event_name == 'pull_request' || github.event_name == 'pull_request_target' }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This command in particular is safe, because it doesn't have access to secrets, but the action does need to be split up into a two workflow process. I am working on that now
These would great things to see in the upload job output like https://github.com/SgtPooki/fwss-simple-static-website/actions/runs/18198348463/attempts/2#summary-51810985939 It would also be great if the PR comment linked to this job artifact so someone can see more details |
FYI this is now working at https://github.com/filecoin-project/filecoin-pin-github-action-test/actions/runs/18283219700/job/52051743238. will work on renaming now and cleaning up usage so its used with |
Re-usable github action.. Example usage in filecoin-project/lotus-docs#821
Summary
filecoin-pin-upload-action
) that can run end-to-end or in a two-step prepare/upload flow.inputs.js
,cache.js
,filecoin.js
,outputs.js
,errors.js
) for clarity, plus comprehensive README guidance on security, permissions, and workflows.Details
actions: read
, capmaxTopUp
, use environments, protect workflows).Fixes #49